<?php echo $this->render('_rootline') ?>

<h1><?php echo $helper->page('title') ?></h1>

<p><a class="button" href="<?php echo $helper->url()->toPage($helper->config('formPid'), array('tx_zboard_pi2' => array('pid' => $helper->page('uid'), 'page' => $this->page))) ?>"><?php echo $helper->translate('Neues Thema erstellen') ?></a></p>

<?php echo $this->render('_paginator') ?>

<?php if($this->topics->count() > 0): ?>
<table border="0" class="topics">
    <tr class="heading">
        <td class="col1"><?php echo $helper->translate('Thema') ?></td>
        <td class="col2"><?php echo $helper->translate('Autor') ?></td>
        <td class="col3"><?php echo $helper->translate('Antworten') ?></td>
        <td class="col4"><?php echo $helper->translate('Letzter Beitrag') ?></td>
    </tr>
    <?php foreach($this->topics AS $topic): ?>
        <tr>
            <td class="col1"><a class="topic" href="<?php echo $helper->url(array('action' => 'topic', 'uid' => $topic->uid)) ?>"><?php echo $topic->subject ?></a></td>
            <td class="col2"><?php echo $helper->profileLink($topic->user_id, $topic->author) ?></td>
            <td class="col3"><?php echo $topic->reply_count ?></td>
            <td class="col4"><?php echo $helper->datetime($topic->last_post_tstamp) ?> <?php echo $helper->profileLink($topic->last_post_user_id, $topic->getLastPostAuthor()) ?></td>
        </tr>
    <?php endforeach; ?>
</table>

<?php echo $this->render('_paginator') ?>

<?php endif; ?>